import request from '@/api/request.js';

// 账号申诉
export const AccountAppeal = (data) => {
	return request(`/system/userAccountAppeal/save`, 'POST', data, true)
}

// 查询是否有商户申请
export const QueryBusinesses = (data) => {
	return request(`/system/userMerchant/queryIsMerchant`, 'GET', data, false)
}

// 商户申请
export const CommercialApply = (data) => {
	return request(`/system/userMerchant/save`, 'POST', data, true)
}


//	投诉建议
export const ComplaintAndAdvice = (data) => {
	return request(`/system/userComplaintAdvice/save`, 'POST', data, true)
}

//	新手教学
export const GetNoviceTeaching = (data) => {
	return request(`/system/ruleNoviceTeaching/pageQuery`, 'GET', data, false)
}

//	隐私协议
export const GetPrivacyAgreement = (data) => {
	return request(`/system/rulePrivacyAgreement/pageQuery    `, 'GET', data, false)
}

// 规则中心
export const GetRuleCenter = (data) => {
	return request(`/system/ruleCenter/pageQuery`, 'GET', data, false)
}

//	校验修改支付密码中短信验证码是否正确
export const CheckPayPwdCode = (data) => {
	return request(`/pay/payWallet/resetCheck`, 'POST', data, true)
}

//	支付密码修改
export const UpdatePayPwd = (data) => {
	return request(`/pay/payWallet/resetPwd`, 'POST', data, true)
}

//	开通会员信息查询
export const GetVipInfo = (data) => {
	return request(`/system/userMemberCard/pageQuery`, 'GET', data, false)
}

//	开通会员预生成订单
export const SendOrderInfo = (data) => {
	return request(`/system/userMember/placeOrder`, 'POST', data, true)
}

//	会员卡支付
// export const PurchaseMembership = (data) => {
// 	return request(`/system/userMember/memberPurchase`, 'POST', data, true)
// }

// 	我的关注列表
export const GetInterestList = (data) => {
	return request(`/system/userFocused/pageQuery`, 'GET', data, false)
}

//	黑名单列表
export const GetBlacklist = (data) => {
	return request(`/system/userBlock/pageQuery`, 'GET', data, false)
}

//	取消拉黑
export const DelBlackUser = (data) => {
	return request(`/system/userBlock/deletes`, 'GET', data, true)
}

//	关注
export const SetInterestUser = (data) => {
	return request(`/system/userFocused/save`, 'GET', data, true)
}

//	取消关注
export const DelInterestUser = (data) => {
	return request(`/system/userFocused/deletes`, 'GET', data, true)
}

//	个人资料查询
// export const GetPersonalData = (data) => {
// 	return request(`/system/userInfo/detail`, 'GET', data, false)
// }
export const GetPersonalData = (data) => {
	return request(`/system/userInfo/detailUserInfo`, 'GET', data, false)
}



//	个人资料保存
export const UpdatePersonalData = (data) => {
	return request(`/system/userInfo/editUserInfo`, 'POST', data, true)
}

//	实名认证查询
export const GetRealAuth = (data) => {
	return request(`/system/userCertificate/byUserId`, 'GET', data, false)
}

//	实名认证保存
export const SaveRealAuth = (data) => {
	return request(`/system/userInfo/authentication`, 'POST', data, true)
}

//	查询用户已保存的能力标签
export const GetUserTag = (data) => {
	return request(`/system/userAbilityLabel/byUserId`, 'GET', data, false)
}

//	获取能力标签游戏类型
export const GetGamesDict = (data) => {
	return request(`/system/gamesInfo/queryInfoForSeven`, 'GET', data, true)
}

//	获取能力标签游戏模式
export const GetGamesPattern = (data) => {
	return request(`/system/gamesTypeTagVicariousType/byGamesId`, 'GET', data, true)
}

//	能力标签保存
export const SaveUserTag = (data) => {
	return request(`/system/userAbilityLabel/save`, 'POST', data, true)
}

//	查询我的关注，完单数量，验收时长，仲裁率数据
export const GetUserInfoData = (data) => {
	return request(`/system/userInfo/baseInfo`, 'GET', data, false)
}

//	我的背包
export const GetBackpackInfo = (data) => {
	return request(`/system/userWarehouseRecord/pageQuery`, 'GET', data, false)
}

// 我的背包 已使用专用 带分页
export const HaveBeenUsedList = (data) => {
	return request(`/system/userWarehouseUseRecord/getUseRecord`, 'GET', data, false)
}

//我的背包-余额
// export const GetWalletInfo = (data) => {
// 	return request(`/pay/payWallet/forOwner`, 'GET', data, false)
// }
export const GetWalletInfo = (data) => {
	return request(`/pay/payWallet/forMyWallet`, 'GET', data, false)
}

//	等级奖励
export const GetUserHatchetLevel = (data) => {
	return request(`/system/userHatchetLevel/levelRewards`, 'GET', data, false)
}

//	明细
export const GetPayOrderListApi = (data) => {
	return request(`/pay/payOrder/payRecord`, 'GET', data, false)
}

//	根据Code查询用户信息
export const GetCodeBackInfoApi = (data) => {
	return request(`/system/userInfo/byCode`, 'GET', data, false)
}

//	获取用户信息
export const GetUserInfoApi = (data) => {
	return request(`/system/userMember/byUserId`, 'GET', data, false)
}

//	收货地址新增
export const SaveAddressApi = (data) => {
	return request(`/system/userDeliveryAddress/save`, 'POST', data, true)
}

//	获取收货地址列表
export const GetAddressListApi = (data) => {
	return request(`/system/userDeliveryAddress/pageList`, 'GET', data, false)
}

//	删除收货地址
export const DelAddressApi = (data) => {
	return request(`/system/userDeliveryAddress/deletes`, 'GET', data, true)
}
//天完币收支明细
export const CoinRecordApi = (data) => {
	return request(`/pay/payOrder/coin/record`, 'GET', data, false)
}

//	背包保存
export const SavePacksackApi = (data) => {
	return request(`/system/userWarehouseRecord/warehouseUse`, 'POST', data, true)
}

//	获取待提现列表
export const GetWithdrawListApi = (data) => {
	return request(`/pay/payOrder/pageList`, 'GET', data, false)
}

//	提现卡使用
export const SetWithdrawtApi = (data) => {
	return request(`/pay/payOrder/save`, 'POST', data, true)
}

// 获取	tag:1 验收 2 仲裁（介入）列表
export const GetCheckArbitrationListApi = (data) => {
	return request(`/order/orderInfo/getArbitramentAndCheckOrder`, 'GET', data, false)
}

//	使用验收仲裁卡
export const SaveCheckArbitrationApi = (data) => {
	return request(`/system/userWarehouseRecord/carUse`, 'GET', data, true)
}

//	充值获取账单
export const GetPayBillApi = (data) => {
	return request(`/pay/payOrder/recharge/withdraw`, 'POST', data, true)
}

//	获取唤醒支付参数
export const GetPayInfoApi = (data) => {
	return request(`/pay/payOrder/recharge/deal`, 'POST', data, false)
}

// H5 支付宝支付
export const GetAliPayInfoApi = (data) => {
	return request(`/pay/payOrder/h5`, 'POST', data, true)
}

// H5 查询支付结果
export const GetAliPayResInfoApi = (data) => {
	return request(`/pay/payOrder/queryResult`, 'GET', data, false)
}
//	支付宝取消支付
export const CancelAlipay = (data) => {
	return request(`/pay/payOrder/ali/cancel`, 'GET', data, false)
}

//	提现校验手机号
export const CheckWithdrawApi = (data) => {
	return request(`/pay/payOrder/check/withdraw`, 'POST', data, false)
}

//	查询提现最大值,最小值
export const GetPayCostSettingApi = (data) => {
	return request(`/pay/payCostSetting/queryInfo`, 'GET', data, false)
}


//观看视频后给个标识记录当前用户看没看新手视频
export const GetVideoTag = (data) => {
	return request(`/system/userNoviceTeachingRecord/save`, 'POST', data, false)
}

//提现充值规则说明
export const GetruleCenterApi = (data) => {
	return request(`/system/ruleCenter/payShow`, 'GET', data, false)
}

//申诉记录
export const GetUserAccountAppealList = (data) => {
	return request(`/system/userAccountAppeal/pageList`, 'GET', data, false)
}
//会员协议
export const GetVipRuleList = (data) => {
	return request(`/system/rulePrivacyAgreement/getByCode`, 'GET', data, false)
}

// 活动公告列表
export const GetActivityNoticeApi = (data) => {
	return request(`/system/ruleAnnouncement/pageQuery`, 'GET', data, false)
}

//由后端返回是否是充值提现记录明细
export const GetpayParamsList = (data) => {
	return request(`/pay/payParam/queryParamList`, 'GET', data, false)
}

//	微信提现 - 获取 OPENID
export const GetOpenIdApi = (data) => {
	return request(`/pay/payOrder/getOpenId`, 'GET', data, false)
}
//商品订单申请退款
export const SaveRefundApi = (data) => {
	return request(`/mall/mallInfoPurchase/refund`, 'POST', data, false)
}


//	更换手机号 校验原手机号
export const PostCheckOldPhone = (data) => {
	return request(`/system/userInfo/editPhone/check`, 'POST', data, true)
}
//	更换手机号 校验新手机号
export const PostCheckNewPhone = (data) => {
	return request(`/system/userInfo/editPhone`, 'POST', data, true)
}


// app端换绑手机号-校验身份证号和姓名：
export const PostCheckCardNo = (data) => {
	return request(`/system/userInfo/editPhone/card`, 'POST', data, true)
}

//	查询手续费
export const GetHandlingCharge = (data) => {
	return request(`/pay/payOrder/platform/recharge`, 'GET', data, true)
}
// 代练员认证
export const PostPlayerAuthentication = (data) => {
	return request(`/system/userInfo/faceVerify`, 'POST', data, true)
}


// 免保证金权益查询
export const GetEquityInfo = (data) => {
	return request(`/order/orderInfo/getUserIsEquityOrder`, 'GET', data, true)
}

// 购买短信接口
export const GetAddSmsPacket = (data) => {
	return request(`/pay/payOrder/addSmsPacket`, 'GET', data, true)
}

// 查询短信包条数
export const GetSmsCount = (data) => {
	return request(`/pay/payOrder/getSmsCount`, 'GET', data, false)
}

// 设置订单提醒
export const GetAddOrderRemind = (data) => {
	return request(`/order/orderInfo/addOrderRemind`, 'POST', data, true)
}

// 查询设置订单提醒
export const PostOrderRemind = (data) => {
	return request(`/order/orderInfo/getOrderRemind`, 'POST', data, true)
}